package cn.hznc.vo;

import cn.hznc.domain.entity.OrderEntity;
import cn.hznc.utils.factory.ExcelExportStrategy;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.fill.FillConfig;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @Author：Administrator
 * @Date：2023/11/21 10:00
 */
@Getter
@Setter
public class ToolUsageReportExport implements ExcelExportStrategy {

    private OrderEntity orderEntity;

    private List<ToolReportVo> toolReportVos;

    @Override
    public ExcelWriter buildExcelWrite(ExcelWriter excelWriter, FillConfig fillConfig, WriteSheet writeSheet) {
        excelWriter.fill(this.orderEntity, fillConfig, writeSheet);
        excelWriter.fill(this.toolReportVos, writeSheet);
        return excelWriter;
    }
}
